<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Web TMDT</title>
<link rel="stylesheet" type="text/css" href="style.css"/>
<script type="text/javascript">
function logged()
{
    document.getElementById("loginform").innerHTML="<a href='member.php?mod=logout'>Logout</a>";
    document.getElementById()    
}
</script>
</head>
<body>
<?php
//include("global.php");
session_start();
?>
<h1>Index</h1>
<div class="y" id="loginform">
<form id="login" name="login" method="post" action="member.php?mod=login">
<table>
<tr><td>Username:&nbsp;</td><td><input type="text" name="user" id="user" size="30" /></td></tr>
<tr><td>Password:&nbsp;</td><td><input type="password" name="pass" id="pass" size="30" /></td></tr>
  
<tr><td><input type="submit" name="submit" value="Login" /></td><td><a href="member.php?mod=forgetpass">Forget Pass</a></td></tr>
</table>
</form>
</div>
<?php
if(isset($_SESSION['logged']) && $_SESSION['logged'])
{
    echo "Welcome back, ".$_SESSION['username']." !";
    echo "<script>logged();</script>";
}
?>
</body>
</html>
